<template>
<transition>
<div v-show="loading" class="loading-mask">
    <div class="loading">
        <img src="@/assets/images/loading.png" alt="">
        <div class="loading-label">
            <span>正在加载数据...</span>
        </div>
    </div>
</div>
</transition>
</template>

<script>
export default {
    name: 'loading',
    components: {},
    data () {
        return {
            host: '正在加载数据...',
            loading: false
        }
    }
}
</script>

<style lang="scss" scoped>
    .loading-mask{
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 9999;
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgba(0, 0, 0, .5);
    }

    .loading{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    img{
        width: 70px;
        height: auto;
        animation-name: loading;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
    }

    .loading-label{
        display: flex;
        height: 15px;
        margin-top: 10px;
        font-size: 12px;
        font-family: DINAlternate-Bold, -apple-system, Hiragino Sans GB, Monospaced Number, Helvetica Neue, Helvetica, Arial, sans-serif;
        font-weight: 700;
        color: #FEFFFF;
    }

  @keyframes loading {
      0%
        {transform: rotateZ(0deg);}
    100%
        {transform: rotateZ(360deg);}
  }

</style>